﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>逻辑运算符</title>
</head>
<body>
    <script language="JavaScript" type="text/javaScript">
        let score = 350;
        document.write("当前的库存数量是：" + score + "。<br>");
        let test1 = ((score > 200) && (score <= 500));
        document.write("库存数量是否大于200并且小于等于500：" + test1 + "<br>");
        let test2 = ((score > 400) || (score === 500));
        document.write("库存数量是否大于400或等于500：" + test2 + "<br>");
        document.write("库存数量小于200，是否提货的结果是：" + (!(score < 200)) + "<br>");
        document.write("库存数量是否小于200：" + ((score < 200) && (score = 500)) + "<br>");
        document.write("执行(score < 200) && (score = 500)之后的数量：" + score + "<br>");
        document.write("库存数量是否大于200：" + ((score > 200) || (score = 500)) + "<br>");
        document.write("执行(score > 200) || (score = 500)之后的数量：" + score);
    </script>
</body>
</html>